{% extends "base.html" %}

{% block title %}{{ title }}{% endblock %}

{% block content %}
<h1>{{ title }}</h1>
{% if adminMore and user.admin%}
<div class="admin">
{% for m in adminMore %}
	<a class="admin" href="{{m.href}}">{{m.label}}</a><br/>
{% endfor %}
</div>
{% endif %}
<table class="rezerwacje">
	<tr><th class="table">Czego:</th><td class="table">{{awaria.czego}}</td>
	<tr><th class="table">Id obiektu:</th><td class="table">{{awaria.id_obiektu}}</td>
	<tr><th class="table">Od:</th><td class="table">{{awaria.od}}</td>
		{% if awaria.do %} 
	<tr><th class="table">Do:</th><td class="table">{{awaria.do}}</td>
		{% endif %}
</table>
{% if not awaria.do %} 
<form action="/KinoRezerwacja/zmienAwarie/{{awaria.id}}/" method="post">
	{% csrf_token %}
	<table class="dodajForm">
	{{ form.as_table}}
	</table>
	<input type="submit" value="Zmień awarię"/>
</form>
{% else %}
Nie można zmienić tej awarii.
{% endif %}

{% endblock %}
